function main()
{
	// find referenced scriptNode
	var param = args.node;
	var file = search.findNode(param);
	
	if(file == null){
		status.setCode(410, "Requested file ("+param+") does not exist.");
		return;
	}
	
	// create a response message object with all properties
	var responseObject={};
	for(prop in file.properties){
		responseObject[prop]=file.properties[prop];
	}

	responseObject.path=file.displayPath;
	responseObject.type=file.type;
	responseObject.parent=file.parent.nodeRef;

	// will a filter be applied
	if (args.proplist) {
		// return only specified properties
		var propParam = eval('(' + args.proplist + ')');
		var resultObject={};
		for(prop in responseObject){
			if(isRequestedProp(propParam,prop)){
				resultObject[prop]=responseObject[prop];
			}
		}
		
	}else{
		// return all properties
		var resultObject=responseObject;
	}

	
	// stringify metadata and response
	var jsonString = jsonUtils.toJSONString(resultObject);
	model.jsonString = jsonString;  
}

/**
 * Determines if the given property is requested.
 * @param list requested props
 * @param prop current prop
 * @returns
 */
function isRequestedProp(list,prop){
	for(var i=0;i<list.length;i++){
		var required=list[i];
		// if in short form convert to long format
		if(required.indexOf(":") >= 0){
			required=utils.longQName(required);
		}
		// check ends with
		if(prop.indexOf(required, prop.length - required.length) !== -1){
			return true;
		} 
	}
	return false;
}

main();